// src/router/index.js
import {createRouter, createWebHistory} from 'vue-router'
import MainCompList from '@/components/MainCompList.vue'
import DetailPage from '@/components/DetailPage.vue'

const routes = [
    {
        path: '/',
        component: MainCompList // 主页面内容（放到 main 里面）
    },
    {
        path: '/:adcode',
        component: DetailPage // 详情页（需要 100% 宽度的内容）
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
